#ifndef PPTALKBASE_H
#define PPTALKBASE_H

//#define _DEBUG

#include <assert.h>

#define ASSERT(_Val) assert(_Val);

#define PUBLIC_FUNCTION_BEGIN
#define PUBLIC_FUNCTION_END

#define PRIVATE_FUNCTION_BEGIN
#define PRIVATE_FUNCTION_END

#define PROTECTED_FUNCTION_BEGIN
#define PROTECTED_FUNCTION_END

#define PROTECTED_SLOT_FUNCTION_BEGIN
#define PROTECTED_SLOT_FUNCTION_END

#define DEFAULT_TITLE_NAME  "PPTalk"

#define TCP_DEFAULT_PORT    6688

#define DECL_SETGET(_NAME, _TYPE)   \
    void    Set##_NAME( const _TYPE _V );        \
    _TYPE   Get##_NAME() const;                 \

#define METHOD_SETGET(_CLASS, _NAME, _TYPE, _VALUE) \
    void    _CLASS::Set##_NAME( const _TYPE _V ) { _VALUE = _V; }    \
    _TYPE   _CLASS::Get##_NAME() const           { return _VALUE; }  \

#define DELETE_POINTER(_Pointer)    \
    if( _Pointer )              \
    {   delete _Pointer;        \
        _Pointer = nullptr;}    \

#endif // PPTALKBASE_H
